package com.wzdigit.wms.common.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateTimeUtil {

    /**
     * 格式化日期，8位
     *
     * @param
     * @return
     */
    public static String getDateStr() {
        Date now = new Date();

        SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
        String dateStr = formatter.format(now);
        return dateStr;
    }

    /**
     * 获得当前时间时分秒
     *
     * @return
     */
    public static String getTimeStr() {
        Date now = new Date();
        SimpleDateFormat formatter = new SimpleDateFormat("HHmmss");
        String timeStr = formatter.format(now);
        return timeStr;
    }
}
